project('terminal-again', 'c', 'cpp',
        version: '0.0.1',
        meson_version: '>=0.61',
        default_options: [
          'b_asneeded=true',
          'b_lundef=false',
          'b_ndebug=if-release',

          # Vte options
          'c_std=gnu11',
          'cpp_std=gnu++20',
          'cpp_eh=default',
          'cpp_rtti=true',

          ],
        ) # project

add_project_arguments(
  #'-D'
  language: 'cpp',
  )# project arguments


third_party_vte = subproject('vte',
  # To build vte options
  default_options: [
    'default_library=static', # use static lib
    'dbg=false', # no debug info
    'docs=false', # I dont need vte docs
    'gir=false', # I dont need g-ir-scanner
    'glade=false', # glade programming no needed ?
    'gtk3=true', # using gtk3
    'gtk4=false', # 
    'vapi=false', # I dont need valac program
    ],
  ) # vte init

terminal_again_source = files(
'src/apis_impl.cpp','src/terminal_again.cpp'
)

executable('terminal-again', terminal_again_source, 
  dependencies: third_party_vte.get_variable('libvte_gtk3_dep'), # using pkg-config in meson
  include_directories : 'include', # include ref links: https://mesonbuild.com/Include-directories.html
  install: true, # support linux install to system wide: meson install, TODO: not test
  ) # exe target

install_data('config',
	install_dir: get_option('sysconfdir') / 'xdg' / 'terminal-again', # TODO: not test
)

# TODO: add man pages and .desktop file
